<html>
	<head>
	</head>
	<body >
		<textarea style='width:500px;height:200px' id='imsg' ></textarea>
		<br/>
		<br/>
		<input style='width:400px;' type='text' id='omsg'/>
		<input style='width:100px;'  type='button' value='send' id='btn' />
		
	</body>
</html>
<script>
		var req;
		var imsg,omsg;
		var btn;
		function load()
		{
			req=new XMLHttpRequest();
			req.onreadystatechange=response;
			imsg=document.getElementById("imsg");
			omsg=document.getElementById("omsg");
			btn=document.getElementById("btn");
			imsg.value="";
			get();
		}
		function response()
		{
		 if (req.readyState == 4) 
			{
			imsg.value+=req.responseText+"\n";
			setTimeout("get();",1000);
			}
		}
		function get()
		{
			req.open("GET","msgget.php",true);
			req.send(null);
		}
		window.onload=load;
</script>
